package com.example.design.a.singleton;

public class HolderSingle {

    private HolderSingle() {
        System.out.println("HolderSingle");
    }

    public int i = 1;

    public static HolderSingle getInstance() {
        return InnerClass.HOLDER_SINGLE;
    }

    private static class InnerClass {
        private InnerClass() {
            System.out.println("InnerClass");
        }

        private static final HolderSingle HOLDER_SINGLE = new HolderSingle();
    }
}
